<html>
<head>
    <title>智能图书平台</title>

<style>
    * {
        box-sizing: border-box;
        font-family: Arial, sans-serif;
    }

    body {
	      background-image: url(./static/002.jpg');
    	   background-size: cover;
        background-color: #f0f2f5;
        margin: 0;
        padding: 0;
    }

    .editbook-container {
        max-width: 400px;
        margin: 5% auto;
        padding: 20px;
        background-color: #fff;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    h1 {
        text-align: center;
        margin-bottom: 20px;
    }

    form {
        display: flex;
        flex-direction: column;
    }

    label {
        font-weight: bold;
        margin: 10px 0 5px;
    }

    input {
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        outline: none;
    }

    input:focus {
        border-color: #007bff;
    }

    button {
        margin-top: 20px;
        padding: 10px;
        background-color: #007bff;
        color: #fff;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
    }

    button:hover {
        background-color: #0056b3;
    }
	.center-text {
            position: fixed;
            bottom: 15px; /* 根据需要调整 */
    	   	 left: 50%;
    	 	 transform: translate(-50%, 50%);
   	 	 color: black;
    	 	 font-size: 15px;
	  }
</style>
</head>
<body>
<div class="editbook-container">
        <h1>编辑书籍</h1>
        <form method="post" action="{{ url_for('edit_book', id=book.id) }}">
            <label for="title">书名</label>
            <input type="text" name="title" id="title" value="{{book.title}}">
            <label for="author">作者</label>
            <input type="text" name="author" id="author" value="{{book.author}}">
            <label for="author">状态</label>
            <select name="state" id="state">
                {% if book.state == "已借阅" %}
                    <option value="已借阅"   >已借阅</option>
                    <option value="未借阅">未借阅</option>
                {% endif %}
                {% if book.state == "未借阅" %}
                    <option value="未借阅">未借阅</option>
                    <option value="已借阅">已借阅</option>
                {% endif %}
            </select>
            <button type="submit">更新</button>
        </form>
    </div>
</body>
</html>